<template>
  <!-- 访客记录-详情 -->
  <public-modal
    width="1000px"
    :footer="false"
    title="详情页"
    modalStyle="detailModal"
    :publicVisible="publicVisible"
    cancelContext="拒绝"
    confirmContext="通过"
    @handleOk="handleOk"
    @cancel="cancel"
  >
    <div slot="content" v-show="type == 'checkOverdue'">
      <div class="common-title">
        <div class="icon"></div>
        <div class="content">逾期详情</div>
      </div>

      <div class="content-wrapper">
        <div class="flex">
          <div class="info-wrap f1">
            <div class="label common-lable">任务下发时间</div>
            <a-tooltip placement="topLeft">
              <template slot="title">
                <span>{{ details.taskTime || '暂无' }} </span>
              </template>
              <div class="value common-value">{{ details.taskTime || '暂无' }}</div>
            </a-tooltip>
          </div>
          <div class="info-wrap f1">
            <div class="label common-lable">逾期时间</div>
            <a-tooltip placement="topLeft">
              <template slot="title">
                <span>{{ details.handleEndTime || '暂无' }} </span>
              </template>
              <div class="value common-value">{{ details.handleEndTime || '暂无' }}</div>
            </a-tooltip>
          </div>
        </div>
        <div class="flex">
          <div class="info-wrap f1">
            <div class="label common-lable">责任民警</div>
            <a-tooltip placement="topLeft">
              <template slot="title">
                <span>{{ details.policeJurisdictionUserName || '暂无' }} </span>
              </template>
              <div class="value common-value">{{ details.policeJurisdictionUserName || '暂无' }}</div>
            </a-tooltip>
          </div>
          <div class="info-wrap f1">
            <div class="label common-lable">当前检查状态</div>
            <a-tooltip placement="topLeft">
              <template slot="title">
                <span>{{ details.eventStatus == 0 ? '未处理' : '已处理' || '暂无' }} </span>
              </template>
              <div class="value common-value">{{ details.eventStatus == 0 ? '未处理' : '已处理' || '暂无' }}</div>
            </a-tooltip>
          </div>
        </div>
      </div>

      <div class="common-title">
        <div class="icon"></div>
        <div class="content">逾期企业信息</div>
      </div>

      <div class="content-wrapper">
        <div class="flex">
          <div class="info-wrap f1">
            <div class="label common-lable">单位名称</div>
            <a-tooltip placement="topLeft">
              <template slot="title">
                <span>{{ details.companyMessageName || '暂无' }} </span>
              </template>
              <div class="value common-value">{{ details.companyMessageName || '暂无' }}</div>
            </a-tooltip>
          </div>
          <div class="info-wrap f1">
            <div class="label common-lable">所属行业</div>
            <a-tooltip placement="topLeft">
              <template slot="title">
                <span>{{ details.industryInformationId_dictText || '暂无' }} </span>
              </template>
              <div class="value common-value">{{ details.industryInformationId_dictText || '暂无' }}</div>
            </a-tooltip>
          </div>
        </div>

        <div>
          <div class="info-wrap">
            <div class="label common-lable">单位办公地址</div>
            <a-tooltip placement="topLeft">
              <template slot="title">
                <span>{{ details.companyMessageAddress || '暂无' }} </span>
              </template>
              <div class="value common-value">{{ details.companyMessageAddress || '暂无' }}</div>
            </a-tooltip>
          </div>
        </div>

        <div class="flex">
          <div class="info-wrap f1">
            <div class="label common-lable">所属派出所</div>
            <a-tooltip placement="topLeft">
              <template slot="title">
                <span>{{ details.policeAgencyName || '暂无' }} </span>
              </template>
              <div class="value common-value">{{ details.policeAgencyName || '暂无' }}</div>
            </a-tooltip>
          </div>
          <div class="info-wrap f1">
            <div class="label common-lable">所属辖区</div>
            <a-tooltip placement="topLeft">
              <template slot="title">
                <span>{{ details.policeJurisdictionName || '暂无' }} </span>
              </template>
              <div class="value common-value">{{ details.policeJurisdictionName || '暂无' }}</div>
            </a-tooltip>
          </div>
        </div>
      </div>
    </div>

    <div slot="content" v-show="type == 'receiptOverdue'">
      <div class="common-title">
        <div class="icon"></div>
        <div class="content">逾期详情</div>
      </div>

      <div class="content-wrapper">
        <div class="flex">
          <div class="info-wrap f1">
            <div class="label common-lable">检查时间</div>
            <a-tooltip placement="topLeft">
              <template slot="title">
                <span>{{ details.taskTime || '暂无' }} </span>
              </template>
              <div class="value common-value">{{ details.taskTime || '暂无' }}</div>
            </a-tooltip>
          </div>
          <div class="info-wrap f1">
            <div class="label common-lable">处罚结果</div>
            <a-tooltip placement="topLeft">
              <template slot="title">
                <span>{{ details.eventContent || '暂无' }} </span>
              </template>
              <div class="value common-value">{{ details.eventContent || '暂无' }}</div>
            </a-tooltip>
          </div>
        </div>
        <div class="flex">
          <div class="info-wrap f1">
            <div class="label common-lable">回执逾期时间</div>
            <a-tooltip placement="topLeft">
              <template slot="title">
                <span>{{ details.handleEndTime || '暂无' }} </span>
              </template>
              <div class="value common-value">{{ details.handleEndTime || '暂无' }}</div>
            </a-tooltip>
          </div>
          <div class="info-wrap f1">
            <div class="label common-lable">当前处理情况</div>
            <a-tooltip placement="topLeft">
              <template slot="title">
                <span>{{ details.eventStatus == 0 ? '未处理' : '已处理' || '暂无' }} </span>
              </template>
              <div class="value common-value">{{ details.eventStatus == 0 ? '未处理' : '已处理' || '暂无' }}</div>
            </a-tooltip>
          </div>
        </div>
        <div>
          <div class="info-wrap">
            <div class="label common-lable">责任民警</div>
            <a-tooltip placement="topLeft">
              <template slot="title">
                <span>{{ details.policeJurisdictionUserName || '暂无' }} </span>
              </template>
              <div class="value common-value">{{ details.policeJurisdictionUserName || '暂无' }}</div>
            </a-tooltip>
          </div>
        </div>
      </div>

      <div class="common-title">
        <div class="icon"></div>
        <div class="content">回执逾期企业信息</div>
      </div>

      <div class="content-wrapper">
        <div class="flex">
          <div class="info-wrap f1">
            <div class="label common-lable">单位名称</div>
            <a-tooltip placement="topLeft">
              <template slot="title">
                <span>{{ details.companyMessageName || '暂无' }} </span>
              </template>
              <div class="value common-value">{{ details.companyMessageName || '暂无' }}</div>
            </a-tooltip>
          </div>
          <div class="info-wrap f1">
            <div class="label common-lable">所属行业</div>
            <a-tooltip placement="topLeft">
              <template slot="title">
                <span>{{ details.industryInformationId_dictText || '暂无' }} </span>
              </template>
              <div class="value common-value">{{ details.industryInformationId_dictText || '暂无' }}</div>
            </a-tooltip>
          </div>
        </div>

        <div>
          <div class="info-wrap">
            <div class="label common-lable">单位办公地址</div>
            <a-tooltip placement="topLeft">
              <template slot="title">
                <span>{{ details.companyMessageAddress || '暂无' }} </span>
              </template>
              <div class="value common-value">{{ details.companyMessageAddress || '暂无' }}</div>
            </a-tooltip>
          </div>
        </div>

        <div class="flex">
          <div class="info-wrap f1">
            <div class="label common-lable">所属派出所</div>
            <a-tooltip placement="topLeft">
              <template slot="title">
                <span>{{ details.policeAgencyName || '暂无' }} </span>
              </template>
              <div class="value common-value">{{ details.policeAgencyName || '暂无' }}</div>
            </a-tooltip>
          </div>
          <div class="info-wrap f1">
            <div class="label common-lable">所属辖区</div>
            <a-tooltip placement="topLeft">
              <template slot="title">
                <span>{{ details.policeJurisdictionName || '暂无' }} </span>
              </template>
              <div class="value common-value">{{ details.policeJurisdictionName || '暂无' }}</div>
            </a-tooltip>
          </div>
        </div>
      </div>
    </div>

    <div slot="content" v-show="type == 'recheckOverdue'">
      <div class="common-title">
        <div class="icon"></div>
        <div class="content">复查逾期详情</div>
      </div>

      <div class="content-wrapper">
        <div class="flex">
          <div class="info-wrap f1">
            <div class="label common-lable">复查逾期时间</div>
            <a-tooltip placement="topLeft">
              <template slot="title">
                <span>{{ details.taskTime || '暂无' }} </span>
              </template>
              <div class="value common-value">{{ details.taskTime || '暂无' }}</div>
            </a-tooltip>
          </div>
          <div class="info-wrap f1">
            <div class="label common-lable">当前复查状态</div>
            <a-tooltip placement="topLeft">
              <template slot="title">
                <span>{{ details.eventStatus == 0 ? '未处理' : '已处理' || '暂无' }}</span>
              </template>
              <div class="value common-value">{{ details.eventStatus == 0 ? '未处理' : '已处理' || '暂无' }}</div>
            </a-tooltip>
          </div>
        </div>
        <div>
          <div class="info-wrap">
            <div class="label common-lable">责任民警</div>
            <a-tooltip placement="topLeft">
              <template slot="title">
                <span>{{ details.policeJurisdictionUserName || '暂无' }}</span>
              </template>
              <div class="value common-value">{{ details.policeJurisdictionUserName || '暂无' }}</div>
            </a-tooltip>
          </div>
        </div>
      </div>

      <div class="common-title">
        <div class="icon"></div>
        <div class="content">企业基本信息</div>
      </div>

      <div class="content-wrapper">
        <div class="flex">
          <div class="info-wrap f1">
            <div class="label common-lable">单位名称</div>
            <a-tooltip placement="topLeft">
              <template slot="title">
                <span>{{ details.companyMessageName || '暂无' }}</span>
              </template>
              <div class="value common-value">{{ details.companyMessageName || '暂无' }}</div>
            </a-tooltip>
          </div>
          <div class="info-wrap f1">
            <div class="label common-lable">所属行业</div>
            <a-tooltip placement="topLeft">
              <template slot="title">
                <span>{{ details.industryInformationId_dictText || '暂无' }}</span>
              </template>
              <div class="value common-value">{{ details.industryInformationId_dictText || '暂无' }}</div>
            </a-tooltip>
          </div>
        </div>

        <div>
          <div class="info-wrap">
            <div class="label common-lable">单位办公地址</div>
            <a-tooltip placement="topLeft">
              <template slot="title">
                <span>{{ details.companyMessageAddress || '暂无' }}</span>
              </template>
              <div class="value common-value">{{ details.companyMessageAddress || '暂无' }}</div>
            </a-tooltip>
          </div>
        </div>

        <div class="flex">
          <div class="info-wrap f1">
            <div class="label common-lable">所属派出所</div>
            <a-tooltip placement="topLeft">
              <template slot="title">
                <span>{{ details.policeAgencyName || '暂无' }}</span>
              </template>
              <div class="value common-value">{{ details.policeAgencyName || '暂无' }}</div>
            </a-tooltip>
          </div>
          <div class="info-wrap f1">
            <div class="label common-lable">所属辖区</div>
            <a-tooltip placement="topLeft">
              <template slot="title">
                <span>{{ details.policeJurisdictionName || '暂无' }}</span>
              </template>
              <div class="value common-value">{{ details.policeJurisdictionName || '暂无' }}</div>
            </a-tooltip>
          </div>
        </div>
      </div>
    </div>

    <div slot="content" v-show="type == 'recheckUnqualified'">
      <div class="common-title">
        <div class="icon"></div>
        <div class="content">复查详情</div>
      </div>

      <div class="content-wrapper">
        <div class="flex">
          <div class="info-wrap f1">
            <div class="label common-lable">复查时间</div>
            <a-tooltip placement="topLeft">
              <template slot="title">
                <span>{{ details.taskTime || '暂无' }}</span>
              </template>
              <div class="value common-value">{{ details.taskTime || '暂无' }}</div>
            </a-tooltip>
          </div>
          <div class="info-wrap f1">
            <div class="label common-lable">复查民警</div>
            <a-tooltip placement="topLeft">
              <template slot="title">
                <span>{{ details.policeUserName || '暂无' }}</span>
              </template>
              <div class="value common-value">{{ details.policeUserName || '暂无' }}</div>
            </a-tooltip>
          </div>
        </div>
        <div class="flex">
          <div class="info-wrap f1">
            <div class="label common-lable">处罚结果</div>
            <a-tooltip placement="topLeft">
              <template slot="title">
                <span>{{ details.eventContent || '暂无' }}</span>
              </template>
              <div class="value common-value">{{ details.eventContent || '暂无' }}</div>
            </a-tooltip>
          </div>
          <div class="info-wrap f1">
            <div class="label common-lable">处理截至时间</div>
            <a-tooltip placement="topLeft">
              <template slot="title">
                <span>{{ details.handleEndTime || '暂无' }}</span>
              </template>
              <div class="value common-value">{{ details.handleEndTime || '暂无' }}</div>
            </a-tooltip>
          </div>
        </div>
      </div>

      <div class="common-title">
        <div class="icon"></div>
        <div class="content">企业基本信息</div>
      </div>

      <div class="content-wrapper">
        <div class="flex">
          <div class="info-wrap f1">
            <div class="label common-lable">单位名称</div>
            <a-tooltip placement="topLeft">
              <template slot="title">
                <span>{{ details.companyMessageName || '暂无' }}</span>
              </template>
              <div class="value common-value">{{ details.companyMessageName || '暂无' }}</div>
            </a-tooltip>
          </div>
          <div class="info-wrap f1">
            <div class="label common-lable">所属行业</div>
            <a-tooltip placement="topLeft">
              <template slot="title">
                <span>{{ details.industryInformationId_dictText || '暂无' }}</span>
              </template>
              <div class="value common-value">{{ details.industryInformationId_dictText || '暂无' }}</div>
            </a-tooltip>
          </div>
        </div>

        <div>
          <div class="info-wrap">
            <div class="label common-lable">单位办公地址</div>
            <a-tooltip placement="topLeft">
              <template slot="title">
                <span>{{ details.companyMessageAddress || '暂无' }}</span>
              </template>
              <div class="value common-value">{{ details.companyMessageAddress || '暂无' }}</div>
            </a-tooltip>
          </div>
        </div>

        <div class="flex">
          <div class="info-wrap f1">
            <div class="label common-lable">所属派出所</div>
            <a-tooltip placement="topLeft">
              <template slot="title">
                <span>{{ details.policeAgencyName || '暂无' }}</span>
              </template>
              <div class="value common-value">{{ details.policeAgencyName || '暂无' }}</div>
            </a-tooltip>
          </div>
          <div class="info-wrap f1">
            <div class="label common-lable">所属辖区</div>
            <a-tooltip placement="topLeft">
              <template slot="title">
                <span>{{ details.policeJurisdictionName || '暂无' }}</span>
              </template>
              <div class="value common-value">{{ details.policeJurisdictionName || '暂无' }}</div>
            </a-tooltip>
          </div>
        </div>

        <div>
          <div class="info-wrap">
            <div class="label common-lable">辖区责任人</div>
            <a-tooltip placement="topLeft">
              <template slot="title">
                <span>{{ details.policeJurisdictionUserName || '暂无' }}</span>
              </template>
              <div class="value common-value">{{ details.policeJurisdictionUserName || '暂无' }}</div>
            </a-tooltip>
          </div>
        </div>
      </div>
    </div>
    <div slot="footer"></div>
  </public-modal>
</template>
<script>
import publicModal from '@/components/publicModal'
export default {
  name: 'detailModal',
  components: { publicModal },
  data() {
    return {
      publicVisible: false,
      details: {},
      type: null, // checkOverdue receiptOverdue recheckOverdue recheckUnqualified
    }
  },
  methods: {
    show(records) {
      this.details = records
      this.type = records.type
      this.publicVisible = true
      console.log(this.details, 'detailsdddddddddd')
    },
    handleOk() {
      this.publicVisible = false
    },
    cancel() {
      this.publicVisible = false
    },
  },
}
</script>
<style scoped lang="less">
/deep/ .modalCotent {
  padding: 20px 40px;
  border-radius: 0 0 4px 4px;
}

/deep/ .modalFooter {
  height: 0 !important;
}
</style>
